package org.anjan.dp.abstractfactory;


public abstract class ShipBuilder {
    /*
    * This acts as an ordering mechanism for creating ships that
    * have a engine and a turbo and a name and nothing else.
    * Specific parts used for the engine and the turbo would
    * depend on the string which is passed to this method.
    * */

    protected abstract Ship makeShip(String shipType);

    /*
    * When called a ship is made. After the ship is made we call varios methods on the ship
    * */

    public Ship orderTheShip(String shipType) {
        Ship ship = makeShip(shipType);
        ship.makeShip();
        ship.displayName();
        ship.loadingShip();
        ship.sailingShip();
        return ship;

    }
}
